<!-- <template>
    <a-modal
      :open="visible"
      title="账号设置"
      :footer="null"
      style="min-width:50%"
      :body-style="{ border: 'none', padding: '0'}"
      @cancel="closeModal"
    >








    </a-modal>
</template>

<script setup>
import { reactive, defineProps, defineEmits } from 'vue';
import { message } from 'ant-design-vue';
import SvgIcon from '@/components/SvgIcon.vue';
import { useJWTStore } from '../stores/JWT'; 
import api from '../../api/index';

const jwtStore = useJWTStore();
// 定义用户信息，并将其设置为响应式
const userInfo = ref({
  name: "苏小侠",
  school: "中国传媒大学",
  stu_num: "2009853P-I011-0015",
  role: jwtStore.getRole
});

// 获取用户信息并更新
api.getUserInfo()
  .then(response => {
    // console.log(response.data);
    userInfo.value.name = response.data.username;
    userInfo.value.school = response.data.university;
    userInfo.value.stu_num = response.data.stu_num;
  })
  .catch(error => {
    router.push('/dashboard');
    console.log('查询失败', error);
  });




const props = defineProps({
  visible: {
    type: Boolean,
    default: false,
  },
});

const emit = defineEmits(['update:visible']);



const closeModal = () => {
  emit('update:visible', false);
};
</script>
 -->
